using UniversalAdmin.Application.Services;
using UniversalAdmin.Application.Configurations;
namespace UniversalAdmin.Application
{

  public static class ServiceConllectionExtionsion
  {
    public static IServiceCollection AddApplication(this IServiceCollection services, IConfiguration config)
    {
      // 绑定JwtSettings配置
      services.Configure<JwtSettings>(config.GetSection("JwtSettings"));

      _ = services.AddScoped<IAppAuthServices, AppAuthServices>();
      _ = services.AddScoped<IAppUserServices, AppUserServices>();
      _ = services.AddScoped<IAppRoleServices, AppRoleServices>();
      _ = services.AddScoped<IAppJwtService, AppJwtServices>();
      _ = services.AddScoped<IAppFileService, AppFileService>();
      _ = services.AddScoped<IAppMenuService, AppMenuService>();
      _ = services.AddScoped<IAppPermissionService, AppPermissionService>();
      _ = services.AddScoped<IAppOperationLogService, AppOperationLogService>();
      _ = services.AddScoped<IAppSystemConfigService, AppSystemConfigService>();
      _ = services.AddScoped<IAppRolePermissionServices, AppRolePermissionServices>();
      _ = services.AddScoped<IAppRoleMenuServices, AppRoleMenuServices>();
      _ = services.AddScoped<IAppUserRoleMappingServices, AppUserRoleMappingServices>();
      // 其它服务注册...
      return services;
    }
  }
}